package com.naiterui.ehp.bp.domain;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

import lombok.ToString;

/**
 * 首页banner信息表
 *
 * @since 2.0.0
 */
@Entity
@ToString
@Table(name = "cms_banner_info")
public class BannerInfo implements java.io.Serializable {

    public static final int IS_EXTERNAL_Y = 0;
    public static final int IS_EXTERNAL_N = 1;
    /**
     * 是否选择医生标签-0.未选择医生标签
     */
    public static final int NOT_LABEL = 0;
    /**
     * 是否选择医生标签-1.已选择医生标签
     */
    public static final int IS_LABEL = 1;

    /**
     * Banner活动类型：Banner
     */
    public static final int BANNER_TYPE_BANNER = 1;
    /**
     * Banner活动类型：FLOAT
     */
    public static final int BANNER_TYPE_LAYER = 2;
    /**
     * Banner活动类型：启动图
     */
    public static final int BANNER_TYPE_START = 3;

    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = -6913073364106578764L;

    private Long id;

    private String imgUrl;
    private String targetUrl;
    private String title;
    private String content;
    private Integer displayOrder;
    private Integer status;
    private Date startTime;
    private Date endTime;
    private Date createdAt;
    private String createdBy;
    private Integer isExternal;
    private Integer bannerType;
    /**
     * 是否选择医生标签
     */
    private Boolean isLabel;
    /**
     * 是否可分享
     */
    private Boolean share;

    private String backColor;

    /**
     * 构造函数
     */
    public BannerInfo() {
        super();
    }

    @Column(name = "is_label")
    public Boolean getIsLabel() {
        return this.isLabel;
    }

    public void setIsLabel(Boolean isLabel) {
        if (null == isLabel) {
            this.isLabel = false;
        } else {
            this.isLabel = isLabel;
        }
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "status")
    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * @return String 取得域 imgUrl 的方法。
     */
    @Column(name = "img_url")
    public String getImgUrl() {
        return this.imgUrl;
    }

    /**
     * @param imgUrl 对域 imgUrl 的设置方法.
     */
    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    /**
     * @return String 取得域 targetUrl 的方法。
     */
    @Column(name = "target_url")
    public String getTargetUrl() {
        return this.targetUrl;
    }

    /**
     * @param targetUrl 对域 targetUrl 的设置方法.
     */
    public void setTargetUrl(String targetUrl) {
        this.targetUrl = targetUrl;
    }

    /**
     * @return String 取得域 title 的方法。
     */
    @Column(name = "title")
    public String getTitle() {
        return this.title;
    }

    /**
     * @param title 对域 title 的设置方法.
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * @return String 取得域 content 的方法。
     */
    @Lob
    @Basic(fetch = FetchType.LAZY)
    @Column(name = "content", columnDefinition = "TEXT", length = 65535)
    public String getContent() {
        return this.content;
    }

    /**
     * @param content 对域 content 的设置方法.
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * @return Integer 取得域 displayOrder 的方法。
     */
    @Column(name = "display_order")
    public Integer getDisplayOrder() {
        return this.displayOrder;
    }

    /**
     * @param displayOrder 对域 displayOrder 的设置方法.
     */
    public void setDisplayOrder(Integer displayOrder) {
        this.displayOrder = displayOrder;
    }

    /**
     * @return Date 取得域 startTime 的方法。
     */
    @Column(name = "start_time")
    public Date getStartTime() {
        return this.startTime;
    }

    /**
     * @param startTime 对域 startTime 的设置方法.
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * @return Date 取得域 endTime 的方法。
     */
    @Column(name = "end_time")
    public Date getEndTime() {
        return this.endTime;
    }

    /**
     * @param endTime 对域 endTime 的设置方法.
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     * @return String 取得域 createdBy 的方法。
     */
    @Column(name = "created_by")
    public String getCreatedBy() {
        return this.createdBy;
    }

    /**
     * @param createdBy 对域 createdBy 的设置方法.
     */
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    /**
     * @return Date 取得域 createdAt 的方法。
     */
    @Column(name = "created_at")
    public Date getCreatedAt() {
        return this.createdAt;
    }

    /**
     * @param createdAt 对域 createdAt 的设置方法.
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    /**
     * @return Integer 取得域 isExternal 的方法。
     */
    @Column(name = "is_external")
    public Integer getIsExternal() {
        return this.isExternal;
    }

    /**
     * @param isExternal 对域 isExternal 的设置方法.
     */
    public void setIsExternal(Integer isExternal) {
        this.isExternal = isExternal;
    }

    @Column(name = "banner_type")
    public Integer getBannerType() {
        return this.bannerType;
    }

    public void setBannerType(Integer bannerType) {
        this.bannerType = bannerType;
    }

    @Column(name = "share")
    public Boolean getShare() {
        return this.share;
    }

    public void setShare(Boolean share) {
        if (null == share) {
            this.share = true;
        } else {
            this.share = share;
        }
    }

    @Column(name = "back_color")
    public String getBackColor() {
        return this.backColor;
    }

    public void setBackColor(String backColor) {
        this.backColor = backColor;
    }

}
